home *** CD-ROM | disk | FTP | other *** search
- Path: news.cuhk.edu.hk!s910500
- From: s910500@acs.csc.cuhk.hk (CHAN CHUN CHUNG)
- Newsgroups: comp.lang.c
- Subject: Unable to check calloc's return values
- Date: 31 Jan 1996 00:57:33 GMT
- Organization: Chinese University of Hong Kong
- Message-ID: <4emept$ifv@hpg30a.csc.cuhk.hk>
- NNTP-Posting-Host: s910500@hp755a.csc.cuhk.hk
- X-Newsreader: TIN [version 1.2 PL2]
-
- Could anyone tell me why the following line is complained by the
- compiler?
-
- if ((float **x = (float **) calloc(9, sizeof(float *)))
- == 0) exit(1);
-
- What's the right way to check the calloc's return value?
-
- Many thanks,
- Jerry
- s910500@acs.csc.cuhk.hk
-